//
//  VideoViewController.m
//  muce
//
//  Created by  yunshao on 2018/2/8.
//  Copyright © 2018年  yunshao. All rights reserved.
//

#import "VideoViewController.h"
#import "pch.h"
#import "AppDelegate.h"
#import "SelVideoPlayer.h"
#import "SelPlayerConfiguration.h"
#import "Masonry.h"
#import "LPRequestParser.h"
#import "LPQuestionnaireViewController.h"                               //做题页面

@interface VideoViewController ()<UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>{
    
}
@property(nonatomic,strong)UIView * backView;
@property(nonatomic,strong)UIButton * backButton;               //返回按钮
@property(nonatomic,strong)UILabel * titleLable;                //标题
@property(nonatomic,strong)UIButton *goodOrDoubtButton;         //点赞和疑问
@property(nonatomic,strong)UIButton *teasingOrAdviceButton;     //
@property(nonatomic,strong)UIButton * selectButtonOne;
@property(nonatomic,strong)UIButton * selectButtonTwo;

@property(nonatomic,strong)NSArray * dataArray;              //吐槽，建议，疑问，点赞源数据。
@property(nonatomic,strong)NSMutableArray *childMutableArray;                 //子菜单列表数据。
@property(nonatomic,strong)NSMutableArray * childMutableArray_One;             //子菜单列表字典数据

@property(nonatomic,assign)NSInteger   fatherId;                //父ID
@property(nonatomic,strong)UITableView * childTableView;        //子菜单表格

@property(nonatomic,strong)UIView * sendView;                   //发送评论视图
@property(nonatomic,strong)UITextField * sendTextFiled;         //发送文本框
@property(nonatomic,strong)UILabel * sendLabel;                 //提示文字
@property(nonatomic,strong)UIButton * sendButton;               //发送按钮。

@property(nonatomic,strong)NSString * pointTimeString;          //评论时间
@property(nonatomic,strong)NSString * contentString;            //评论类容
@property(nonatomic,strong)NSString * menuId;                   //父ID
@property(nonatomic,strong)NSString * s_MenuId;                 //子ID

@property(nonatomic,strong)UILabel * redLabel;                  //屏幕上的小红点 （两个）
@property(nonatomic,strong)UILabel * redLabel_Two;                  //屏幕上的小红点 （两个）




@property (nonatomic, strong) SelVideoPlayer *player;
@property (nonatomic, strong) SelPlayerConfiguration *configuration;

@end

@implementation VideoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addMianView];
    [self requData];
}



#pragma mark--init**********************************初始化*******************************
-(instancetype)init{
    self = [super init];
    if (self) {
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(isEnd) name:@"isEnd" object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(suspended) name:@"suspended" object:nil];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(nowTime:) name:@"NowTime" object:nil];
        
       
    }
    return self;
}
#pragma mark *********************移除通知 *************************
-(void)dealloc{
    
    [[NSNotificationCenter defaultCenter]removeObserver:self name:@"isEnd" object:nil];
    [[NSNotificationCenter defaultCenter]removeObserver:self name:@"suspended" object:nil];
    [[NSNotificationCenter defaultCenter]removeObserver:self name:@"NowTime" object:nil];
}

-(void)isEnd{


}
-(void)suspended{
    LPQuestionnaireViewController * articleVc =[[LPQuestionnaireViewController alloc]init];
    [self presentViewController:articleVc animated:NO completion:nil];
    
    
}
-(void)nowTime:(NSNotification *)info{
    NSLog(@"%@",info.userInfo);
    self.pointTimeString = [NSString stringWithFormat:@"%@",info.userInfo[@"NowTime"][@"nowtime"]];
}

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
   [ LPRequestParser postLoginAppUserName:[NSString stringWithFormat:@"%@",[LPCommonTool readphoneNumber]] securityCode:[LPCommonTool readUserDefaultObjectForKey:DSUSERKEY][@"password"] url:FinishParticipate block:^(id responseObject, NSError *error) {
       if (responseObject) {
           //这里要根据，返回的东西，来判断是非返回上一个页面
           [self backButtonClicked];
           
       }
        
    }];
}



-(void)requData{
    
    [LPRequestParser postLoginAppUserName:[NSString stringWithFormat:@"%@",[LPCommonTool readphoneNumber]] securityCode:[LPCommonTool readUserDefaultObjectForKey:DSUSERKEY][@"password"] url:OwnpaperApp block:^(id responseObject, NSError *error) {
        if ([responseObject count] > 0) {
            //没有状态返回，只有用数据的个数来处理了。
            self.dataArray = responseObject;
        }
    }];
}


-(void)addMianView{
    _backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0,  DSDevice_H,DSFixedPX(110))];
    _backView.backgroundColor = DSColorWithHex(0x3279ca);
    _backView.userInteractionEnabled = YES;
    [self.view addSubview:_backView];
    
    _backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _backButton.frame = CGRectMake(DSFixedPX(20), DSFixedPX(40), DSFixedPX(40), DSFixedPX(40));
    [_backButton setImage:[UIImage imageNamed:@"title_back"] forState:UIControlStateNormal];
    [_backButton addTarget:self action:@selector(backButtonClicked) forControlEvents:UIControlEventTouchUpInside];
    [_backView addSubview:_backButton];
    _titleLable = [[UILabel alloc]initWithFrame:CGRectMake(DSFixedPX(40), DSFixedPX(40), DSDevice_H - DSFixedPX(80), DSFixedPX(50))];
    _titleLable.text = @"测评";
    _titleLable.font = DSFontSize(16);
    _titleLable.textAlignment = NSTextAlignmentCenter;
    _titleLable.textColor = DSColorWithHex(0xffffff);
    [_backView addSubview:_titleLable];
    
    for (int i = 0; i <4; i++) {
        _goodOrDoubtButton = [UIButton buttonWithType:UIButtonTypeCustom];
        if (i == 0) {
             _goodOrDoubtButton.frame = CGRectMake(0,DSFixedPX(110) +  0 *(( DSDevice_W - DSFixedPX(110))/2 + DSFixedPX(1)), DSFixedPX(110),( DSDevice_W - DSFixedPX(110) )/2.0f );
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"dz_0"] forState:UIControlStateNormal];
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"dz_1"] forState:UIControlStateSelected];
        }else if (i == 1){
            _goodOrDoubtButton.frame = CGRectMake(0,DSFixedPX(110) +  1 *(( DSDevice_W - DSFixedPX(110))/2 + DSFixedPX(1)), DSFixedPX(110),( DSDevice_W - DSFixedPX(110) )/2.0f );
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"yw_0"] forState:UIControlStateNormal];
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"yw_1"] forState:UIControlStateSelected];
        }else if (i == 2){
            
            _goodOrDoubtButton.frame = CGRectMake(DSDevice_H - DSFixedPX(110), DSFixedPX(110) +  0 *(( DSDevice_W - DSFixedPX(110))/2 + DSFixedPX(1)), DSFixedPX(110),( DSDevice_W - DSFixedPX(110) )/2.0f);
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"tc_0"] forState:UIControlStateNormal];
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"tc_1"] forState:UIControlStateSelected];

        }else if (i == 3){
            _goodOrDoubtButton.frame = CGRectMake(DSDevice_H - DSFixedPX(110), DSFixedPX(110) +  1 *(( DSDevice_W - DSFixedPX(110))/2 + DSFixedPX(1)), DSFixedPX(110),( DSDevice_W - DSFixedPX(110) )/2.0f);
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"jy_0"] forState:UIControlStateNormal];
            [_goodOrDoubtButton setImage:[UIImage imageNamed:@"jy_1"] forState:UIControlStateSelected];

        }
        _goodOrDoubtButton.tag = 200 + i;
        [_goodOrDoubtButton addTarget:self action:@selector(goodOrDoubtButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
       // self.selectButtonOne = _goodOrDoubtButton;
        
        [self.view addSubview:_goodOrDoubtButton];

    }
    
    _configuration = [[SelPlayerConfiguration alloc]init];
    _configuration.shouldAutoPlay = YES;             //自动播放
    _configuration.supportedDoubleTap = YES;         //双击播放暂停
    _configuration.shouldAutorotate = NO;           //自动旋转
    _configuration.repeatPlay = NO;                 //重复播放
    _configuration.statusBarHideState = SelStatusBarHideStateFollowControls;     //状态栏的隐藏显示
//    configuration.sourceUrl = [NSURL URLWithString:@"http://120.25.226.186:32812/resources/videos/minion_02.mp4"];                  //视频源
    _configuration.sourceUrl = [NSURL URLWithString:self.addressUrl];
    _configuration.videoGravity = SelVideoGravityResizeAspect;           //拉伸方式
    _player = [[SelVideoPlayer alloc]initWithFrame:CGRectMake(DSFixedPX(110), DSFixedPX(110), DSDevice_H - DSFixedPX(110) - DSFixedPX(110), DSDevice_W - DSFixedPX(110)) configuration:_configuration];
    
    [self.view addSubview:_player];
    NSLog(@"高度：%f,%f",self.player.frame.size.height,self.player.frame.size.width);
     NSLog(@"中心：%f,%f",self.player.frame.size.height/2.0f,self.player.frame.size.width/2.0f);
//    NSInteger   heightCenter = self.player.frame.size.height / 2.0f;
//    NSInteger   widthCenter = self.player.frame.size.width / 2.0f;
//
    NSInteger  heightAverage  = self.player.frame.size.width / 19.0f;   //每一份的高度
    NSInteger  widthAverage   =self.player.frame.size.height / 11.0f;   //每一份的宽度
    
    NSLog(@"每一分：%ld,%ld",heightAverage,widthAverage);
    
    
    NSInteger heigth_One ;           //第一个点
    NSInteger width_One;
    
    NSInteger  height_Two;          //第二个点
    NSInteger  width_Two;

    if (self.x_One  == 0 ) {
        heigth_One = self.player.frame.size.width / 2.0f;
    }else{
        heigth_One = self.player.frame.size.width / 2.0f + heightAverage * self.x_One;
    }

    if (self.y_One  == 0 ) {
        width_One = self.player.frame.size.height / 2.0f;
    }else {
        width_One = self.player.frame.size.height / 2.0f  + widthAverage * self.y_One;
    }

    if (self.x_Two  == 0 ) {
        height_Two = self.player.frame.size.width / 2.0f;
    }else{
        height_Two = self.player.frame.size.width / 2.0f  + heightAverage * self.x_Two;
    }

    if (self.y_Two  == 0 ) {
        width_Two = self.player.frame.size.height / 2.0f;
    }else {
        width_Two = self.player.frame.size.height / 2.0f  + widthAverage * self.y_Two;
    }
    

    NSLog(@"%ld,%ld,%ld,%ld",self.x_One,self.y_One,self.x_Two,self.y_Two);
    NSLog(@"位置：%ld,%ld,%ld,%ld",heigth_One,width_One,height_Two,width_Two);
    
   
        self.redLabel = [[UILabel alloc]init];
        self.redLabel = [[UILabel alloc]initWithFrame:CGRectMake( width_One,heigth_One, DSFixedPX(10), DSFixedPX(10))];
        self.redLabel.backgroundColor = [UIColor redColor];
        self.redLabel.layer.masksToBounds = YES;
        self.redLabel.layer.cornerRadius = DSFixedPX(1)/2.0f;
        [_player addSubview:self.redLabel];
    
    self.redLabel_Two = [[UILabel alloc]init];
    self.redLabel_Two.frame = CGRectMake( width_Two ,height_Two  , DSFixedPX(10), DSFixedPX(10));

    self.redLabel_Two.backgroundColor = [UIColor redColor];
    self.redLabel_Two.layer.masksToBounds = YES;
    self.redLabel_Two.layer.cornerRadius = DSFixedPX(1)/2.0f;
    [_player addSubview:self.redLabel_Two];

    
    
    _sendView = [[UIView alloc]initWithFrame:CGRectMake(DSFixedPX(110), CGRectGetMaxY(_player.frame) - DSFixedPX(160) , DSDevice_H - DSFixedPX(110) - DSFixedPX(110), DSFixedPX(100))];
    _sendView.backgroundColor = [UIColor clearColor];
    _sendView.hidden = YES;
    
    
   _sendTextFiled = [[UITextField alloc]initWithFrame:CGRectMake(0, DSFixedPX(10), DSDevice_H - DSFixedPX(110) - DSFixedPX(110) - DSFixedPX(130), DSFixedPX(80))];
    _sendTextFiled.backgroundColor = DSColorWithHex(0x367bc8);
    _sendTextFiled.alpha = 0.75f;
    _sendTextFiled.layer.masksToBounds = YES;
    _sendTextFiled.layer.cornerRadius = DSFixedPX(5);
    _sendTextFiled.textColor = [UIColor whiteColor];
    _sendTextFiled.delegate = self;
   // [_sendTextFiled addTarget:self action:@selector(sendTextFiledClicked) forControlEvents:UIControlEventTouchUpInside];
    //_sendTextFiled.placeholder = @" 请输入宝贵意见";
    [_sendView addSubview:_sendTextFiled];
    
    _sendLabel = [[UILabel alloc]initWithFrame:CGRectMake(DSFixedPX(10), DSFixedPX(10), DSDevice_H - DSFixedPX(260), DSFixedPX(80))];
    _sendLabel.text = @"请输入宝贵意见";
    _sendLabel.textColor = [UIColor whiteColor];
    [_sendView addSubview:_sendLabel];
    
    _sendButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _sendButton.frame = CGRectMake(CGRectGetMaxX(_sendTextFiled.frame) + DSFixedPX(5), DSFixedPX(10), DSFixedPX(100), DSFixedPX(80));
    _sendButton.layer.masksToBounds = YES;
    _sendButton.layer.cornerRadius = DSFixedPX(5);
    _sendButton.backgroundColor = DSColorWithHex(0x20ac19);
    [_sendButton setTitle:@"发送" forState:UIControlStateNormal];
    [_sendButton addTarget:self action:@selector(sendButtonClicked) forControlEvents:UIControlEventTouchUpInside];
    [_sendView addSubview:_sendButton];
    
    
    [self.view addSubview:_sendView];
    
    
    
     self.childTableView  = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
//    self.childTableView.rowHeight = DSFixedPX(72);
    self.childTableView.delegate = self;
   // self.childTableView.style = UITableViewStyleGrouped;
    self.childTableView.dataSource = self;
    self.childTableView.tableFooterView = [UIView new];
    [self.view addSubview:self.childTableView];
}

-(void)sendButtonClicked{
    self.contentString = _sendTextFiled.text;
    [self sendHttp];
    
}

-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
    _sendLabel.hidden = YES;
    return YES;
    
}
-(void)textFieldDidEndEditing:(UITextField *)textField{
    if (_sendTextFiled.text.length <= 0) {
        _sendLabel.hidden = NO;
    }
}


-(void)goodOrDoubtButtonClicked:(UIButton *)sender{
    //点击按钮后 ，表格显示
    self.childTableView.hidden = NO;
    for (int i = 0; i <4; i++) {
        UIButton * btn = (UIButton *)[[sender superview]viewWithTag:200 +i];
        if (sender.tag == btn.tag) {
            sender.selected = !sender.selected;
             // self.childTableView.hidden = YES;
        }else{
            [btn setSelected:NO];
           
        }
    }
    if (sender.selected == YES) {
        self.childTableView.hidden = NO;
    }else{
        self.childTableView.hidden = YES;
    }
    
    
    
    
    self.childMutableArray = [[NSMutableArray alloc]init];
    self.childMutableArray_One = [[NSMutableArray alloc]init];
//
//    self.selectButtonOne.selected = !self.selectButtonOne.selected;
//    sender.selected = !sender.selected;
//    self.selectButtonOne = sender;
//    NSLog(@"%ld",sender.tag);
    if (sender.tag == 200) {
        self.fatherId = [self.dataArray[0][@"id"] integerValue];
    }else if (sender.tag == 201){
         self.fatherId = [self.dataArray[1][@"id"] integerValue];
    }else if (sender.tag == 202){
        self.fatherId = [self.dataArray[2][@"id"] integerValue];
    }else if (sender.tag == 203){
        self.fatherId = [self.dataArray[3][@"id"] integerValue];
    }
    NSLog(@"哥哥：%ld",self.fatherId);
    
    [LPRequestParser postOwnpaperAttachedFatherId:self.fatherId url:OwnpaperAttachedApp UserName:[NSString stringWithFormat:@"%@",[LPCommonTool readphoneNumber]] securityCode:[LPCommonTool readUserDefaultObjectForKey:DSUSERKEY][@"password"] block:^(id responseObject, NSError *error) {
        if ([responseObject count] >0) {
            for (int i = 0; i<[responseObject count]; i++) {
                [self.childMutableArray addObject:responseObject[i][@"menu_name"]];
                [self.childMutableArray_One addObject:responseObject[i]];
                
                
            }
            if(self.fatherId == 91 || self.fatherId == 93){
                [self.childMutableArray addObject:@"其他"];
                [self.childMutableArray_One addObject:responseObject[0][@"menu_id"]];
            }
            
            
        }
       

//        if (sender.tag == 200) {
//            
//        }else if (sender.tag == 201){
//            self.fatherId = [self.dataArray[1][@"id"] integerValue];
//        }else if (sender.tag == 202){
//            self.fatherId = [self.dataArray[2][@"id"] integerValue];
//        }else if (sender.tag == 203){
//            self.fatherId = [self.dataArray[3][@"id"] integerValue];
//        }

        
       
         NSLog(@"数组：%@",self.childMutableArray);
        if (sender.tag == 200 || sender.tag == 201) {
            self.childTableView.frame = CGRectMake(DSFixedPX(64),CGRectGetMaxY(_backView.frame), DSFixedPX(200),DSFixedPX(72) * self.childMutableArray.count);
        }else{
            self.childTableView.frame = CGRectMake( DSDevice_W  - DSFixedPX(200) - DSFixedPX(64), CGRectGetMaxY(_backView.frame), DSFixedPX(200), DSFixedPX(72) * self.childMutableArray.count);
        }
        [self.childTableView reloadData];
    }];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.childMutableArray.count;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return  DSFixedPX(72);
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"testCell"];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"testCell"];
    }
    cell.textLabel.text = [NSString stringWithFormat:@"%@",self.childMutableArray[indexPath.row]];
    cell.textLabel.font = DSFontSize(13);
    cell.textLabel.textAlignment = NSTextAlignmentCenter;
    cell.textLabel.textColor = DSColorWithHex(0xffffff);
    cell.backgroundColor = DSColorWithHex(0x333333);
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"%@",self.childMutableArray_One[indexPath.row]);
    //点击cell的时候，接收通知
 

    
    
    //点击了cell以后，表格隐藏。
    self.childTableView.hidden = YES;
    //如果是最后一行，
    if (indexPath.row == [self.childMutableArray_One count] - 1 ) {
        _sendView.hidden = NO;
        self.menuId = [NSString stringWithFormat:@"%@",self.childMutableArray_One[indexPath.row]];
        
        self.s_MenuId = @"0";
    }else{
        //不是最后一行
        self.menuId = [NSString stringWithFormat:@"%@",self.childMutableArray_One[indexPath.row][@"menu_id"]];      //id
        self.s_MenuId =[NSString stringWithFormat:@"%@",self.childMutableArray_One[indexPath.row][@"id"]];          //子ID
        self.contentString =[NSString stringWithFormat:@"%@",self.childMutableArray_One[indexPath.row][@"menu_name"]];  //内容
        _sendView.hidden = YES;
        
        [self sendHttp];
        
        
    }
    NSLog(@"%@,%@",self.menuId,self.s_MenuId);
    
}

-(void)sendHttp{
    
    //预览用户
    if ([[LPCommonTool readIdengit] integerValue] == 1) {
//        [SVProgressHUD showSuccessWithStatus:@"评论成功，不提交"];
        
        UIAlertController  * testAlertV = [UIAlertController alertControllerWithTitle:@"" message:@"评论成功" preferredStyle:UIAlertControllerStyleAlert];
        [self presentViewController:testAlertV animated:YES completion:^{
            [self dismissViewControllerAnimated:YES completion:^{
               
            }];
        }];
        _sendView.hidden = YES;
        return;
    }
    // 官方用户。
    NSDictionary *dic = [LPCommonTool readUserDefaultObjectForKey:DSUSERKEY];
    [LPRequestParser postSaveOwnpaperAppUname:[NSString stringWithFormat:@"%@",[LPCommonTool readphoneNumber]] url:SaveOwnpaperApp SecurityCode:dic[@"password"] Point_time:self.pointTimeString MenuId:self.menuId S_menu_id:self.s_MenuId Menu_content:self.contentString block:^(id responseObject, NSError *error) {
        if (responseObject) {
            if ([responseObject[@"status"] isEqualToString:@"success"]) {
                // [SVProgressHUD showSuccessWithStatus:@"评论成功"];
                //评论成功  隐藏评论输入视图
                _sendView.hidden = YES;
                
                
                UIAlertController  * testAlertV = [UIAlertController alertControllerWithTitle:@"提示" message:@"评论成功" preferredStyle:UIAlertControllerStyleAlert];
                [self presentViewController:testAlertV animated:YES completion:^{
                    [self dismissViewControllerAnimated:YES completion:^{
                        
                    }];
                }];
                
            }else{
               // [SVProgressHUD showSuccessWithStatus:@"评论失败"];
            }
        }else{
           // [SVProgressHUD showSuccessWithStatus:@"评论失败"];
        }
        
    }];
}


-(void)backButtonClicked{
    [self dismissViewControllerAnimated:YES completion:nil];
}

////支持的方向
-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskLandscapeRight;
}
////是否可以旋转
-(BOOL)shouldAutorotate{
    return YES;
}
//controller即将出现的时候旋转屏幕成横屏
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    AppDelegate *appdele = (AppDelegate *)[UIApplication sharedApplication].delegate;
    appdele.allorRotation = YES;
}

-(void)viewWillDisappear:(BOOL)animated{
    AppDelegate * appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
        appDelegate.allorRotation = NO;
    if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
        SEL selector = NSSelectorFromString(@"setOrientation:");
        NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[UIDevice instanceMethodSignatureForSelector:selector]];
        [invocation setSelector:selector];
        [invocation setTarget:[UIDevice currentDevice]];
        int val = UIInterfaceOrientationPortrait;
        [invocation setArgument:&val atIndex:2];
        [invocation invoke];
    }
    
  
    

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




@end
